package com.example.huainanlive.api


import com.demon.net.AppResponse
import com.example.huainanlive.factory.AppResponseSecond
import com.example.huainanlive.bean.*
import com.example.huainanlive.factory.s.AppResponseThrid
import retrofit2.http.*


interface AuthService {

    /**
     * 直播回顾
     * @return
     */
    @GET("api/app/livehouse/getLiveHouseRecord")
    suspend fun liveHouseRecord(): AppResponseSecond<ArrayList<GetLiveHouseRecordBeanItem>>

    /**
     * 直播预告
     *
     * @return
     */
    @GET("api/app/livehouse/getLiveHousePreview")
    suspend fun liveHousePreview(): AppResponse<ArrayList<GetLiveHousePreviewBeanItem>>

    /**
     * 查询直播详情页面
     *
     * @return
     */
    @GET("api/app/livehouse/getLiveHouseDetail/{liveId}")
    suspend fun liveHouseDetail(
        @Path("liveId") liveId: Long = 0L
    ): AppResponse<GetLiveHouseDetailBean>


    /**
     * api/app/livehouse/getLiveHouseRecordDetail/{recordId}
     * 查询直播回顾详情页面
     *
     * @return
     */
    @GET("api/app/livehouse/getLiveHouseRecordDetail/{recordId}")
    suspend fun liveHouseRecordDetail(
        @Path("recordId") recordId: Long = 0L
    ): AppResponse<GetliveHouseRecordDetailBean>


    /**
     * api/app/livehouse/getComment
     * 查询直播主持人评论分页
     * @return
     */
    @GET("api/app/livehouse/getComment")
    suspend fun getComment(
        @Query("liveId") liveId: Long = 0L,
        @Query("pageSize") pageSize: Int = 0,
        @Query("pageNum") pageNum: Int = 0
    ): AppResponseSecond<ArrayList<GetCommentItem>>

    /**
     * api/app/livehouse/getMessage
     * 查询直播用户留言分页
     * @return
     */
    @GET("api/app/livehouse/getMessage")
    suspend fun getMessage(
        @Query("liveId") liveId: Long = 0L,
        @Query("pageSize") pageSize: Int = 0,
        @Query("pageNum") pageNum: Int = 0
    ): AppResponseSecond<ArrayList<GetCommentItem>>

    /**
     * api/app/livehouse/getWord
     * 查询直播快捷词
     * @return
     */
    @GET("api/app/livehouse/getWord")
    suspend fun getWord(
        @Query("liveId") liveId: Long = 0L,
    ): AppResponse<ArrayList<GetWorldItem>>


    /**
     * api/app/livehouse/addSub
     * 添加预约
     * @return
     */
    @POST("api/app/livehouse/addSub")
    suspend fun addSub(
        @Body liveId: LiveIdBean? = null,
    ): AppResponseThrid<String>

    /**
     * api/app/livehouse/cancelSub
     * 取消预约
     * @return
     */
    @POST("api/app/livehouse/cancelSub")
    suspend fun cancelSub(
        @Body liveId: LiveIdBean? = null,
    ): AppResponseThrid<String>

    /**
     * api/app/livehouse/enterLive
     * 进入直播间
     * @return
     */
    @POST("api/app/livehouse/enterLive")
    suspend fun enterLive(
        @Body liveId: LiveIdBean? = null,
    ): AppResponseThrid<String>

    /**
     * api/app/livehouse/addMsg
     * 添加留言
     * @return
     */
    @POST("api/app/livehouse/addMsg")
    suspend fun addMsg(
        @Body addMsgBean: AddMsgBean? = null
    ): AppResponseThrid<String>

    /**
     * api/app/livehouse/addZan
     * 点赞
     * @return
     */
    @POST("api/app/livehouse/addZan")
    suspend fun addZan(
        @Body addMsgBean: AddZanBean? = null,
    ): AppResponseThrid<String>

    /**
     * api/app/livehouse/leaveLive
     * 退出直播间
     * @return
     */
    @POST("api/app/livehouse/leaveLive")
    suspend fun leaveLive(
        @Body liveId: LiveIdBean? = null,
    ): AppResponseThrid<String>

}